<!DOCTYPE html>
<html lang="zh">
    <head>
        <meta charset="utf-8" />
        <title>Markdown Editor For Vasquez</title>
        <link rel="stylesheet" href="css/style.css" />
        <link rel="stylesheet" href="css/editormd.css" />
        <style>
            .ME_global_nav {
                background-color: #ddf;
                width: 100%;
                height: 3rem;
            }

            .ME_global_nav_register, .ME_global_nav_login {
                margin: 0 1rem;
                width: 4rem;
                height: 3rem;
                float: right;
            }

            .ME_global_nav_register a, .ME_global_nav_login a {
                text-decoration: none;
                font-size: 2rem;
            }

            .ME_global_nav_QQlogin {
                margin-top: 12px;
                display: block;
                width: 76px;
                height: 24px;
                background-image: url("//pub.idqqimg.com/qconn/wiki/wikiv2//sprite/style.png");
                background-repeat: no-repeat;
                background-position: -139px -29px;
            }
        </style>
    </head>
    <body>
        <div id="layout">
            <div id="editormd">
                <textarea style="display:none;" id="markdown_content">##Hello world!

####开启识别和解析HTML标签

配置项：

    {
		htmlDecode : true
	}

####示例
#####上标和下标

上标：X<sup>2</sup>

下标：O<sub>2</sub>

#####插入Flash

<embed src="http://player.youku.com/player.php/sid/XMzA0MzIwMDgw/v.swf" allowFullScreen="true" quality="high" width="480" height="400" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash"></embed>

#####插入视频

李健《最好不相见》

<iframe height=498 width=510 src="http://player.youku.com/embed/XMzA0MzIwMDgw" frameborder=0 allowfullscreen></iframe>
""""""""""""""""""

</textarea>
        </div>
        </div>

        <script src="js/jquery.min.js"></script>
        <script src="js/editormd.js"></script>
		<script src="lib/handlerbars.js"></script>
		<script src="lib/oper.js"></script>
        <script type="text/javascript">
            $(function() {
                var editor = editormd("editormd", {
                    width: "90%",
                    height: 540,
                    path : './lib/',
					htmlDecode: true,

					// 显示的工具栏
					toolbarIcons : function() {
			            return [
						    "undo", "redo", "|",
			                "bold", "del", "italic", "quote", "|",
			                "h1", "h2", "h3", "h4", "h5", "h6", "|",
			                "list-ul", "list-ol", "hr", "|",
			                "link", "anchor", "image", "code", "code-block-tab", "code-block", "datetime", "|",
			                "watch", "preview", "fullscreen", "clear", "|",
						    "info","save", "list"
						]
					},

					// 设置工具栏的图标/文本
					toolbarIconTexts : {
					    save : "保存",
                        list : "查看"
					},

					// 设置工具栏的响应函数
					toolbarHandlers : {
						save : function (cm, icon, cursor, selection) {
							var content = $(".editormd-preview").html();
							var title = $("#title").val();
                            var markdown = $("#markdown_content").html();
							saveAs(title, content, markdown);
						},
                        list : function (cm, icon, cursor, selection) {
                            listAll();
                        }
					}
                });
            });
        </script>
    </body>
</html>